package com.tianlu.store.common;

public enum ResultCode {
    CODE_200(200, "请求成功"),
    SUCCESS(200, "请求成功"),
    SUCCESS_LOGIN(200, "用户登录成功"),
    SUCCESS_LOGOUT(200, "用户退出成功"),
    CODE_400(400, "数据异常，请联系管理员"),
    CODE_401(401, "登录已失效，请重新登录！"),
    CODE_402(402, "缺少参数"),
    CODE_403(403, "鉴权失败，您没有权限操作"),
    CODE_405(405, "签名失败，请联系管理员"),
    CODE_406(406, "传参失败，不支持当前请求方法"),
    CODE_407(407, "接口已失效，请重新请求！"),
    CODE_408(408, "请求超时，请重试"),
    CODE_410(410, "系统繁忙，请稍后后再操作"),
    USER_LOGIN_FAIL(419, "登录失败"),
    USER_NOT_LOGIN(420, "用户未登录"),
    USER_ACCOUNT_EXPIRED(421, "账号已过期"),
    USER_CREDENTIALS_ERROR(422, "密码错误"),
    USER_CREDENTIALS_EXPIRED(423, "密码过期"),
    USER_ACCOUNT_DISABLE(424, "账号不可用，请联系管理员"),
    USER_ACCOUNT_LOCKED(425, "账号被锁定"),
    USER_ACCOUNT_NOT_EXIST(426, "账号不存在"),
    USER_ACCOUNT_ALREADY_EXIST(427, "账号已存在，请直接登录"),
    USER_ACCOUNT_USE_BY_OTHERS(428, "账号下线"),
    USER_ACCOUNT_CAPTCHA(429, "验证码错误"),
    NO_PERMISSION(430, "当前账号没有此权限或失效，请重新登录"),
    RESP_CODE_FLOW_LIMITING_EXCEPTION(431, "接口限流，请稍后重试"),
    RESP_CODE_DEGRADE_EXCEPTION(432, "接口降级，请稍后重试"),
    RESP_CODE_AUTHORITY_EXCEPTION(433, "热点参数限流，请稍后重试"),
    RESP_MSG_PARAM_FLOW_EXCEPTION(434, "系统规则（负载/...不满足要求），请稍后重试"),
    RESP_CODE_SYSTEM_BLOCK_EXCEPTION(435, "授权规则不通过，请稍后重试"),
    RESP_CODE_SMS_SEND_EXCEPTION(460, "短信验证码发送失败"),
    CODE_500(500, "程序异常，请联系管理员！");

    public Integer code;
    public String msg;

    private ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static ResultCode getByCode(Integer code) {
        ResultCode[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            ResultCode resultCode = var1[var3];
            if (code.equals(resultCode.code)) {
                return resultCode;
            }
        }

        return null;
    }
}
